home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 155 / 155.d81 / 3d show (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  149 lines

  1. 10 rem %%   3-d art show   %%
  2. 20 rem %% ken robinson '97 %%
  3. 30 rem
  4. 40 poke55,0:poke56,48:clr
  5. 50 dv=peek(186):ifdv<8thendv=8
  6. 60 sys57812"3d.o",dv,0:poke780,0:poke781,0:poke782,201:sys65493
  7. 70 v=53248:pokev+21,0:pokev+23,0
  8. 80 forx=0to3:pokev+39+x,15:poke2040+x,14:pokev+27+x,0:next
  9. 90 dimfl$(3):forx=0to3:readf$:fl$(x)=f$:next
  10. 100 data commodore3d.shp,pyramid3d.shp,loadshell 3d.shp,kite3d.shp
  11. 140 sp=896:forx=0to62:pokesp+x,0:next
  12. 145 forx=0to23:read y:pokesp+x,y:next
  13. 150 data 255,0,0,255,0,0,195,0
  14. 151 data 0,195,0,0,195,0,0,195
  15. 152 data 0,0,255,0,0,255,0,0
  16. 160 gosub1000:gosub1280
  17. 200 sys49201
  18. 205 sys49152:poke53265,11
  19. 210 gosub2000
  20. 220 sys49185
  21. 227 poke198,0
  22. 230 geta$:ifa$<"1"ora$>"6"then230
  23. 235 a=val(a$)
  24. 238 print"[147][144]":sys49201
  25. 240 on a goto300,244,244,244,244,40000
  26. 242 goto230
  27. 244 f1$=fl$(a-2):iff1$=f2$then265
  28. 245 open15,dv,15:close15:if st =0then250
  29. 247 f$="drive off-line!":t=20-(len(f$)/2)
  30. 248 poke214,14:print:poke211,t:printf$;
  31. 249 poke198,0:wait198,1:goto200
  32. 250 f$="loading...."+left$(f1$,len(f1$)-6):t=20-(len(f$)/2)
  33. 252 poke214,14:print:poke211,t
  34. 255 printf$;
  35. 260 sys57812f1$,dv,0:poke780,0:poke781,0:poke782,48:sys65493:f2$=f1$
  36. 265 print"[147]":pokev+32,0:pokev+33,0
  37. 266 poke251,48:poke252,96:poke253,92:sys51456
  38. 268 sys51459
  39. 270 poke198,0
  40. 272 geta$:ifa$=""then272
  41. 274 sys51459:goto200
  42. 300 poke53280,0:poke53281,0:printchr$(14)"[147]";
  43. 303 print"[160][160][160][160][160][160][160][160][160][160][154][200][207][215][160][212][207][160][214][201][197][215] [208][201][195][212][213][210][197][211]"
  44. 304 print"          [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  45. 306 print"  [154][212]hese 3-[196] or '[205]agic [197]ye' pictures are ";
  46. 308 print"  [154]viewed by staring at the two light"
  47. 309 print"  gray squares at the top of a picture"
  48. 310 print"  (like the ones above this screen) and"
  49. 311 print"  letting your eyes relax and focus"
  50. 312 print"  beyond the screen.  Eventually they"
  51. 313 print"  will appear to split apart into four"
  52. 314 print"  squares.  When the two inner squares"
  53. 315 print"  join together, hold for three seconds.";
  54. 316 print"    [208]ress [211][208][193][195][197][194][193][210] for demonstration  [146]";
  55. 320 forx=0to3:pokev+1+2*x,50:next
  56. 322 pokev,160:pokev+2,160:pokev+4,208:pokev+6,208
  57. 324 pokev+21,15
  58. 330 poke198,0
  59. 332 geta$:ifa$<>" "then332
  60. 340 forx=1to30
  61. 342 pokev,peek(v)+1
  62. 344 pokev+2,peek(v+2)-1
  63. 346 pokev+4,peek(v+4)+1
  64. 348 pokev+6,peek(v+6)-1
  65. 350 poke162,0
  66. 351 ifpeek(162)<2goto351
  67. 352 next
  68. 354 forx=1to6
  69. 356 pokev,peek(v)-1
  70. 358 pokev+2,peek(v+2)+1
  71. 360 pokev+4,peek(v+4)-1
  72. 362 pokev+6,peek(v+6)+1
  73. 363 poke162,0
  74. 364 ifpeek(162)<2goto364
  75. 365 next
  76. 366 poke162,0
  77. 368 ifpeek(162)<90then368
  78. 400 poke53280,0:poke53281,0:printchr$(14)"[147]";
  79. 401 print"[146][154][160][160][160][160][160][160][160][160][160][160]HOW[160]TO[160]VIEW PICTURES"
  80. 402 print"          {$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}"
  81. 403 print
  82. 404 print"   [154]After the picture appears to clear"
  83. 405 print
  84. 406 print"  [154]up, lower your eyes and you should"
  85. 407 print"  see the three-dimensional effect."
  86. 408 print"   Another method is to hold your head"
  87. 409 print"  close to the screen and slowly move"
  88. 410 print
  89. 411 print"  back without moving your eyes."
  90. 412 print"  Ken Robinson"
  91. 413 print"  {$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}"
  92. 414 print"          [208]ress [211][208][193][195][197] for menu  [146]";
  93. 415 poke198,0
  94. 416 geta$:ifa$<>" "then416
  95. 418 pokev+21,0:goto200
  96. 1000 rem
  97. 1010 foru=49152to49272:readq:pokeu,q:ck=ck+q:next
  98. 1020 ifck<>14738thenprint"error in data":end
  99. 1035 return
  100. 1040 data120,169,127,141,13,220,169,1,141,26,208,169,40,141,18,208,169,27
  101. 1050 data141,17,208,169,81,141,20,3,169,192,141,21,3,88,96,173,18,208
  102. 1060 data201,38,208,249,173,17,208,73,16,141,17,208,96,120,169,49,141,20
  103. 1070 data3,169,234,141,21,3,169,240,141,26,208,169,129,141,13,220,173,120
  104. 1080 data195,141,32,208,141,33,208,88,96,169,1,141,25,208,174,18,208,224
  105. 1090 data0,240,20,189,80,195,141,33,208,141,32,208,232,232,142,18,208,104
  106. 1100 data168,104,170,104,64,169,40,141,18,208,76,49,234
  107. 1280 rem
  108. 1290 fort=50000to50000+254step2:poket,0:next
  109. 1300 fort=50000+40to50000+40+214step2
  110. 1310 ford=0to4:poket,12:t=t+2:next
  111. 1320 poket,0:t=t+2
  112. 1330 poket,11:t=t+2
  113. 1340 poket,15
  114. 1350 next
  115. 1360 return
  116. 2000 poke53280,11:poke53281,15:printchr$(142)"[147]";
  117. 2001 print"[146]                {$7f}[146]           {$7f}"
  118. 2002 print"            [144]     [144]{$7f}[146]       [144]    [144]{$7f}"
  119. 2003 print"                 [144] [146]       [144] [146]   [144] "
  120. 2004 print"                 [144] [146]       [144] [146]   [144] "
  121. 2005 print"                 [144] [146]    [146]   [144] [146]   [144] "
  122. 2006 print"                 [144] [146]     [146]  [144] [146]   [144] "
  123. 2007 print"                 [144] [146]       [144] [146]   [144] "
  124. 2008 print"                 [144] [146]       [144] [146]   [144] "
  125. 2009 print"                [146][169][144] [146]          [146][169][144] "
  126. 2010 print"   ken           [146][169]           [146][169]  j & f"
  127. 2011 print" robinson                      publish."
  128. 2012 print"       3 - d   a r t   s h o w"
  129. 2013 print"   1. instructions   4. loadshell
  130. 2014 [153]"   2. commodore      5. kite"
  131. 2015 [153]"   3. pyramid        6. quit/loadstar"
  132. 2016 [142]
  133. 10000 dv[178][194](186):[139]dv[179]8[167]dv[178]8
  134. 10010 n$[178]"3d show":[159]15,dv,15,"s0:"[170]n$[170]".bu":[152]15,"r0:"[170]n$[170]".bu="[170]n$:[160]15
  135. 10020 [148] n$,dv:[128]
  136. 40000 [143] %% quit %%
  137. 40001 [151]53280,0:[151]53281,0:[153]"load"
  138. 40002 [129]i[178]0[164]21:[151]828[170]i,8[170]i:[130]
  139. 40010 [139]dv[179]8[176]dv[177]29[176]dv[178]8[167]40030
  140. 40020 a[178][194](828):b[178][194](828[170]dv[171]8):[151]828,b:[151]828[170]dv[171]8,a
  141. 40030 a$[178]"hello connect":[129]j[178]8[164]29:i[178][194](828[170]j[171]8):[139]i[178]14[167][130]
  142. 40040 [160]2:[159]2,i,2:[160]2:[139]st[167]40060
  143. 40050 [160]15:[159]15,i,15,"r0:"[170]a$[170]"="[170]a$:[132]15,er:[160]15:[139]er[178]63[167]40070
  144. 40060 [130]:[151]186,8:[151]56,160:[156]:[151]53280,14:[151]53281,6
  145. 40065 [153]"contloadhappy computing!":[128]
  146. 40070 q$[178][199](34):[151]53272,23
  147. 40080 [153]"loadstopp(NULL)2048,0:p(NULL)44,8:p(NULL)43,1:p(NULL)56,160:p(NULL)55,0:clr:l(NULL)"q$a$q$","i
  148. 40090 [153]"run:":[151]631,13:[151]632,13:[151]198,2:[128]
  149.